import { defineStore } from "pinia";
import type { InternalAxiosRequestConfig } from "axios";
import type { AxiosCostomConfig } from "@/api";
// axios用,不需要持久化处理
export const useAxiosInfoStore = defineStore("axiosInfoStore", {
	state: () => ({
		// 全部请求列表,用于记录自定义参数
		AllRequestList: [] as {
			config: InternalAxiosRequestConfig;
			customConfig: AxiosCostomConfig;
		}[],
		// 未授权的请求,用于刷新token后重新发起请求
		unauthorizedRequest: [] as InternalAxiosRequestConfig[],
	}),
});
